<?php

namespace plugin\admin\app\model;

use plugin\admin\app\model\Base;

/**
 * @property integer $id (主键)
 * @property integer $device_id 设备
 * @property integer $user_id 
 * @property integer $type 预警类型
 * @property string $message 报警信息
 * @property integer $status 状态
 * @property integer $alarm_num 报警编号
 * @property string $notify_status 
 * @property string $sms_status 
 * @property string $wechat_status 
 * @property integer $last_send_at 最后发送消息时间
 * @property mixed $created_at 创建时间
 * @property mixed $updated_at
 */
class AlarmNotification extends Base
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'wa_alarm_notifications';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';


    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function device()
    {
        return $this->belongsTo(Device::class, 'device_id', 'id');
    }


    
    
    
}
